<cfcomponent output="false">
	<cfset $ = application.helpers />
	
	<!--- --->
	
	<cffunction name="searchTags" access="public" output="false" returntype="query">
		<cfargument name="input" required="true" />
		<cfargument name="exclude" required="true" />
		
		<cfset var local = {} />
		
		<cfquery name="local.searchTags" datasource="fundrdb">
			select 
			id
			from tag
			where id like #$.database.string('%#arguments.input#%')#
			and active = 1
			<cfif arguments.exclude neq ''>
				and id not in #$.database.strings(arguments.exclude)#
			</cfif>
		</cfquery>
		
		<cfreturn local.searchTags />
		
	</cffunction>
	
	<!--- --->

</cfcomponent>